/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 30318
 * Date: 2023-12-12
 * Time: 16:19
 */
public abstract class Shape {
    private String color;
    public Shape() {
        color = "RED";
    }

    public Shape(String color) {
        this.color = color;
    }

    public String show() {
        return color;
    }

    public abstract double getArea();
}

class Circle extends Shape{
    private double r;

    public Circle(String color, double r) {
        super(color);
        this.r = r;
    }

    public double getR() {
        return r;
    }

    public double getArea() {
        return Math.PI*r*r;
    }
}

class Rectangle extends Shape{
    private double a;
    private double b;

    public Rectangle(String color, double a, double b) {
        super(color);
        this.a = a;
        this.b = b;
    }

    public double getArea() {
        return a*b;
    }
}